﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using W.Purchase.Domain;
using W.Purchase.Repository.Interface;

namespace W.Purchase.Repository.Impl
{
    public class UnitRepository : BaseRepository<Unit>, IUnitRepository
    {
        public UnitRepository(EFCoreDbContext db) : base(db)
        {
        }
        public async Task<int> AddAsync(Unit unit)
        {
            return await base.AddAsync(unit);
        }

        public async Task<List<Unit>> GetAllAsaync()
        {
            return await base.GetAllAsaync();
        }
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<Unit> GetModelAsync(int id)
        {
            return await base.GetModelAsync(id);
        }
        public async Task<int> DeleteAsync(Unit t)
        {
            return await base.DeleteAsync(t);
        }
        public async Task<List<Unit>> GetAsync(Expression<Func<Unit, bool>> expre)
        {
            return await base.GetAsync(expre);
        }

        public async Task<int> Update(Unit unit)
        {
            return await base.Update(unit);
        }
    }
}
